# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=remmina
pkgver=1.4.34
pkgrel=1
pkgdesc="Remmina is a remote desktop client written in GTK+"
url="https://www.remmina.org/"
arch="all"
license="GPL-2.0-or-later"
makedepends="
	avahi-ui-dev
	cmake
	curl-dev
	freerdp
	freerdp-dev
	gnutls-dev
	gtk+3.0-dev
	json-glib-dev
	libayatana-appindicator-dev
	libgcrypt-dev
	libjpeg-turbo-dev
	libsecret-dev
	libsodium-dev
	libssh-dev
	libvncserver-dev
	libxkbfile-dev
	openssl-dev>3
	pcre2-dev
	python3-dev
	samurai
	vte3-dev
	zlib-dev
	"
replaces="remmina-plugins"
subpackages="$pkgname-dev $pkgname-lang $pkgname-doc"
source="https://gitlab.com/Remmina/Remmina/-/archive/v$pkgver/Remmina-v$pkgver.tar.gz
	remmina-1.0.0-dsofix.patch
	"
options="!check" # No test suite available
builddir="$srcdir/Remmina-v$pkgver"

build() {
	LDFLAGS="$LDFLAGS -lintl" \
	cmake -G Ninja -B build \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DWITH_APPINDICATOR=OFF \
		-DWITH_AVAHI=ON \
		-DWITH_FREERDP=ON \
		-DWITH_GCRYPT=ON \
		-DWITH_LIBSSH=ON \
		-DWITH_PTHREAD=ON \
		-DWITH_TELEPATHY=OFF \
		-DWITH_VTE=ON \
		-DWITH_ZLIB=ON \
		-DWITH_KF5WALLET=OFF \
		-DWITH_CUPS=OFF \
		-DWITH_LIBSECRET=ON \
		-DWITH_SPICE=OFF \
		-DWITH_WWW=OFF \
		-DWITH_PYTHONLIBS=ON
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
e3301540d98fd8812e5d6b83acf975aeb6464f234cd176ce7f0501b93eb188f4a40fcd08ba740f2f45ce54cbf2a25146d11bdf1b23334d6c1e5e580f4236d9a5  Remmina-v1.4.34.tar.gz
8c06cfb4cd7eb74f641d6524c2fb5c941022df1d3f428c9f57a88b9714ec602b0baf962a9947aa83de3ccfaed237956743b4eb0083c4dde0cc9740b958bba007  remmina-1.0.0-dsofix.patch
"
